<%-- 
    Document   : ens
    Created on : 2 déc. 2013, 19:58:43
    Author     : jackson
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="com.myapp.struts.modele.Etudiant"%>
<%@page import="com.myapp.struts.modele.Promotion"%>
<%@page import="com.myapp.struts.modele.EstAbsent"%>
<%@page import="com.myapp.struts.modele.Matiere"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">


        <!-- Bootstrap core CSS -->
        <link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet">

        <!-- Custom styles for this template -->
        <link href="http://getbootstrap.com/examples/signin/signin.css" rel="stylesheet">

        <!-- Just for debugging purposes. Don't actually copy this line! -->
        <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
        <style type="text/css"></style></head>

    <jsp:useBean id="bd" class="com.myapp.struts.modele.QueryBD" scope="session"/>
    <div class="col-md-4"></div>
    <div class="col-md-4">    <form  action="DeconnexionAction.do">
                    <button class='btn btn-primary btn-block pull-right' type='submit' value='Deconnexion'>Déconnexion</button>
        </form></div>
    <div class="col-md-4"></div>
    <br>
    <div class="container">
        
        <center>
            <h1>Bienvenue dans votre espace personnel 
                <% out.print(bd.getEnseignant().getPrenom());%> 
            </h1>
            <div class="container">
      <div class="row">
        <div class="col-md-6">
          <h2>Faire appel</h2>
          <form method=POST action="FaireAppelAction.do">
                                <p><SELECT name="promotion" size="1">    
                                    <% for (int i = 0; i < bd.getEnseignant().getPromotions().size(); i++) {
                                            out.print("<option>" + bd.getEnseignant().getPromotions().get(i).getNom());
                                        }
                                    %>
                                </SELECT></p>
                                
                                <input type="hidden" name="nenseignant" value="<% out.print(bd.getEnseignant().getNenseingant());%>">
                                <p><button class='btn btn-success btn-xs' type='submit' value='Appel'><span class='glyphicon glyphicon-ok-circle'></span></button></p>                  
                        </form>
        </div>
        <div class="col-md-4">
          <h2>Consulter absences</h2>
          <form method=POST action="ListerEtuAction.do">
                                <p><SELECT name="promo" size="1">    
                                    <% for (int i = 0; i < bd.getEnseignant().getPromotions().size(); i++) {
                                            out.print("<option>" + bd.getEnseignant().getPromotions().get(i).getNom());
                                        }
                                    %>
                                </SELECT></p>
                                <p><SELECT name="mat" size="1">    
                                <% for (int i = 0; i < bd.getEnseignant().getMatieres().size(); i++) {
                                   out.print("<option>" + bd.getEnseignant().getMatieres().get(i).getNom());
                                } 
                                %>
                                </SELECT></p>
                                <input type="hidden" name="nensei" value="<% out.print(bd.getEnseignant().getNenseingant());%>">
                                <p><button class='btn btn-success btn-xs' type='submit' value='Lister'><span class='glyphicon glyphicon-ok-circle'></span></button></p>                  
                        </form>
       </div>
      </div>          
        </center>
    </div>
</body>
</html>
